<template>
	<view class="body">
		<infoNoLogin ref="infoTarget" v-if="isTenant=='NOT_YET_TENANT' || isTenant=='Notloggedin'" />
		<infoLogin ref="infoTarget" v-if="isTenant=='TENANT'" />
		<message ref="infoTarget" v-if="isTenant=='Admin'" />
		<!-- <tabbar></tabbar> -->
	</view>
</template>

<script>
	// import tabbar from '@/components/tabbar.vue'
	import infoNoLogin from './info-no-login.vue'
	import infoLogin from './info-login.vue'
	import message from './message.vue'
	export default {
		components: {
			infoNoLogin,
			infoLogin,
			message,
			// tabbar
		},
		data() {
			return {
				isTenant: this.$util.isTenant(), // 是否为租客mounted
				isLogin: this.$util.isLogin(),	//
			};
		},
		beforeMount(){
			uni.showShareMenu({menus: ["shareAppMessage","shareTimeline"]});
			console.log('isTenant',this.isTenant)
		},
		mounted() {

		// this.$util.getHeightWithTopEl(".tabs-bar").then(height => {
		// 	console.warn("height:====: ", height )
		// 	this.scrollViewHeight = height - 20;
		// });
		console.log('isTenant',this.isTenant)
		
		if(this.isTenant=='TENANT' || this.isTenant=='NOT_YET_TENANT' || this.isTenant=='Notloggedin' )
			this.$refs.infoTarget.shoppingCart()
			this.$util.changeMenuTwo()
		},
		methods:{
		}
	}
</script>

<style lang="scss" scoped>
</style>
